CREATE OR REPLACE
VIEW pmdv_context_vw
AS
SELECT
  SYS_CONTEXT( 'USERENV', 'CLIENT_IDENTIFIER' ) client_identifier,
  SYS_CONTEXT( 'USERENV', 'CLIENT_INFO' ) client_info,
  SYS_CONTEXT( 'USERENV', 'CURRENT_SCHEMA' ) current_schema,
  SYS_CONTEXT( 'USERENV', 'CURRENT_USER' ) current_user,
  SYS_CONTEXT( 'USERENV', 'DB_DOMAIN' ) db_domain,
  SYS_CONTEXT( 'USERENV', 'DB_NAME' ) db_name,
  SYS_CONTEXT( 'USERENV', 'DB_UNIQUE_NAME' ) db_unique_name,
  SYS_CONTEXT( 'USERENV', 'HOST' ) host,
  SYS_CONTEXT( 'USERENV', 'IP_ADDRESS' ) ip_address,
  SYS_CONTEXT( 'USERENV', 'ISDBA' ) isdba,
  SYS_CONTEXT( 'USERENV', 'OS_USER' ) os_user,
  SYS_CONTEXT( 'USERENV', 'TERMINAL' ) terminal,
  SYS_CONTEXT( 'USERENV', 'SID' ) sid,
  SYS_CONTEXT( 'USERENV', 'SESSIONID' ) sessionid,
  SYS_CONTEXT( 'USERENV', 'SERVER_HOST' ) server_host,
  SYS_CONTEXT( 'USERENV', 'SERVICE_NAME' ) service_name,
  DBMS_SESSION.UNIQUE_SESSION_ID unique_session_id,
  SYS_CONTEXT( 'PMDV_CONTEXT', 'WORKID' ) pmdv_workid,
  SYS_CONTEXT( 'PMDV_CONTEXT', 'IP_ADDRESS' ) pmdv_ip_address,
  SYS_CONTEXT( 'PMDV_CONTEXT', 'TERMINAL' ) pmdv_terminal,
  SYS_CONTEXT( 'PMDV_CONTEXT', 'OSUSER' ) pmdv_osuser,
  SYS_CONTEXT( 'PMDV_CONTEXT', 'NAME' ) pmdv_name,
  SYS_CONTEXT( 'PMDV_CONTEXT', 'DESCRIPTION' ) pmdv_description
FROM dual;
